<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>易买网</title>
        <link rel="stylesheet" type="text/css" href="./css/style.css">
    </head>

    <body>
        <!--头部-->
        <jsp:include page="commons/header.jsp" />

        <div id="main" class="wrap">
            <!--左侧分类-->
            <jsp:include page="commons/left.jsp" />

            <!--  特价商品&热门&新闻&公告 -->
            <div class="main">
                <!--首页商品信息列表-->
                <div class="price-off">
                    <h2>今日特价</h2>
                    <ul class="product clearfix">
                        <c:forEach items="${specialProducts}" var="product" >
                            <li>
                                <dl>
                                    <dt>
                                        <a href="product?id=${product.id}"><img src="${product.proPic}"></a>
                                    </dt>
                                    <dd class="title">
                                        <a href="product?id=${product.id}">${product.name}</a>
                                    </dd>
                                    <dd class="price">￥${product.price}</dd>
                                </dl>
                            </li>
                        </c:forEach>
                    </ul>
                </div>

                <!--右侧信息-->
                <jsp:include page="commons/right.jsp" />

                <!--推荐商品列表-->
                <div>
                    <h2>热卖推荐</h2>
                    <ul class="product clearfix">
                        <c:forEach items="${hotProducts}" var="product" >
                            <li>
                                <dl>
                                    <dt>
                                        <a href="product?id=${product.id}"><img src="${product.proPic}"></a>
                                    </dt>
                                    <dd class="title">
                                        <a href="product?id=${product.id}">${product.name}</a>
                                    </dd>
                                    <dd class="price">￥${product.price}</dd>
                                </dl>
                            </li>
                        </c:forEach>
                    </ul>
                </div>
            </div>
            <div class="clear"></div>
        </div>


        <!--底部-->
        <jsp:include page="commons/footer.jsp" />

    </body>
</html>